@import "../base/util/scss_function";
@import "../base/list-common";
$fontSize:20;
$fontSizeSvg:36;
$htmlSize:20rem/$fontSize;
html {
    font-size: $htmlSize;
}

.icon {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
}

.alt-example{
    position: fixed;
    z-index: 999;
    left: 0;
    right:0;
    top:0;
    bottom:0;
    background-color: rgba(0,0,0,0.8);
    & .close{
        position: absolute;
        top:16px;
        right:16px;
        width:26px;
        height: 26px;
        text-align: center;
        line-height: 24px;
        background-color: #fff;
        border-radius: 50%;
        color:#000;
        &:after{
            content: "×";
        }
    }
    & .view{
        @include transform(translate(-50%,-50%));
        position: absolute;
        left:50%;
        top:50%;
        max-width: 80%;
        max-height: 80%;
    }
}
.icon-prev {
    display: none;
}

.diy-header {
    height: 40px;
    line-height: 40px;
    background-color: #ff7e00;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    .title {
        margin: 0;
        padding: 0;
        text-align: center;
        font-size: 24.5rem/$fontSizeSvg;
        font-weight: 100;
    }
    .submit-btn {
        position: absolute;
        right: 0;
        top: 0;
        font-size: 24rem/$fontSizeSvg;
        display: block;
        padding: 0 24rem/$fontSizeSvg;
        line-height: 60rem/$fontSizeSvg;
        text-align: center;
        font-weight: 100;
    }
}
#svg-container{
    overflow: visible;
}
.svg-content-panel{
    width: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    padding-top: 48px;
    padding-bottom: 160px;
    & .bag-bg-img{
        max-width: 100%;
    }
    & .bag-bg-v{
        position: relative;
        margin: 0 5px;
        & .svg-content {
            width: 100%;
            position: absolute;
            top: 0px;
            left: 0%;
        }
    }
}
#svg_content_box {
    width: 100%;
}
.bottom-tool {
    padding: 8px 0;
    position: fixed;
    background-color: #fff;
    bottom: 0;
    left: 0;
    width: 100%;
    & .svg-operate {
        width: 260px;
        margin: 0 auto;
        margin-bottom:8px;
        font-size: 0;
        text-align: center;
        & .upload-txt {
            text-align: center;
            color: #fff;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            font-size: 12px;
        }
        & .upload-text-box ,
        & .upload-image-box,
        & .example{
            background: #ff7e00;
            width: 30%;
            margin: 0 1.5%;
            height: 30px;
            line-height: 30px;
            display: inline-block;
            font-size:12px;
            color:#fff;
            text-align: center;
            vertical-align: top;
        }
        & .upload-image-box {
            position: relative;
            .upload-file {
                opacity: 0;
                position: absolute;
                top: 0;
                right: 0;
                left: 0;
                bottom: 0;
                width: 100%;
                height: 100%;
                z-index: 1;
            }
        }
        & .upload-text-box {
            position: relative;
        }
        & .example{
        }
    }
    & .svg-template-list-box {
        @include clearfix-row();
        border-top: 1px solid #ff7e00;
        overflow: scroll;
        -webkit-overflow-scrolling: touch;
        padding: 8px 0;
        margin-top: 8px;
    }
    & .svg-template-list {
        list-style: none;
        white-space: nowrap;
        li {
            margin-left: 10rem/$fontSizeSvg;
            display: inline-block;
            width: 240rem/$fontSizeSvg;
            height: 155rem/$fontSizeSvg;
            border-radius: 10rem/$fontSizeSvg;
            border: 1rem/$fontSizeSvg solid #ff7e00;
            text-align: center;
            position: relative;
            overflow: hidden;
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;
            opacity: 0.6;
            .template-name {
                text-align: center;
                color: #fff;
                font-size: 13rem/$fontSizeSvg;
                height: 28rem/$fontSizeSvg;
                line-height: 28rem/$fontSizeSvg;
                background-color: rgba(255, 126, 0, .6);
                position: absolute;
                bottom: 0;
                width: 100%;
                left: 0;
            }
            &.active {
                opacity: 1;
                background-color: #5b9eaa;
                color: #fff;
            }
        }
    }
}

.edit-text-box {
    position: absolute;
    top: 60rem/$fontSizeSvg;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    // display: none;
    visibility: hidden;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    & .edit-text-content {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280rem/$fontSize;
        -webkit-transition: -webkit-transform .4s;
        transition: transform .4s;
        -webkit-transform: translate3d(100%, 0, 0);
        transform: translate3d(100%, 0, 0);
        background-color: #FFF;
        & .btn {
            position: absolute;
            left: 10rem/$fontSize;
            right: 10rem/$fontSize;
            bottom: 10rem/$fontSize;
            display: block;
            font-size: 14rem/$fontSize;
            color: #FFF;
            line-height: 44rem/$fontSize;
            text-align: center;
            background-color: #1D8AFF;
            border: 1rem/$fontSize solid #1D8AFF;
            border-radius: 3rem/$fontSize;
            & ~ .edit-text-scroll {
                bottom: 65rem/$fontSize;
            }
        }
        & .content-block {
            margin: 15rem/$fontSize;
            & .buttons-tab{
                display: -webkit-box;
                display: -webkit-flex;
                display: flex;
                & a {
                    position: relative;
                    display: block;
                    -webkit-box-flex: 1;
                    -webkit-flex: 1;
                    flex: 1;
                    margin-left: -1rem/$fontSize;
                    font-size: 12rem/$fontSize;
                    color: #1D8AFF;
                    line-height: 30rem/$fontSize;
                    text-align: center;
                    border: 1rem/$fontSize solid #1D8AFF;
                    &:first-child {
                        margin-left: 0;
                        border-radius: 6rem/$fontSize 0 0 6rem/$fontSize;
                    }
                    &:last-child {
                        border-radius: 0 6rem/$fontSize 6rem/$fontSize 0;
                    }
                    &.active {
                        color: #FFF;
                        background-color: #1D8AFF;
                    }
                }
            }
        }
        & .edit-text-scroll {
            position: absolute;
            top: 60rem/$fontSize;
            right: 10rem/$fontSize;
            bottom: 0rem/$fontSize;
            left: 10rem/$fontSize;
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            & .edit-textarea {
                width: 100%;
                padding: 10rem/$fontSize;
                font-size: 14rem/$fontSize;
                color: #555;
                border: 1rem/$fontSize solid #DDD;
                border-radius: 2rem/$fontSize;
                box-sizing: border-box;
            }
            & .edit-text-font {
                & li {
                    padding: 10rem/$fontSize 5rem/$fontSize;
                    border: 1rem/$fontSize solid transparent;
                    &.active {
                        background-color: rgba(29, 138, 255, 0.2);
                    }
                }
            }
            & .edit-text-color {
                padding-left: 1rem/$fontSize;
                margin-right: -6rem/$fontSize;
                & li {
                    position: relative;
                    float: left;
                    width: 16.66%;
                    padding-top: 15%;
                    background-color: #444;
                    background-clip: padding-box;
                    border: 1rem/$fontSize solid #DDD;
                    box-sizing: border-box;
                    margin: -1rem/$fontSize 0 0 -1rem/$fontSize;
                    &.active:after {
                        content: "\e611";
                        position: absolute;
                        top: 50%;
                        left: 50%;
                        margin: -8rem/$fontSize 0 0 -8rem/$fontSize;
                        font-size: 16rem/$fontSize;
                        color: #FFF;
                        text-shadow: 0 0 3rem/$fontSize rgba(0,0,0,0.5);
                        font-family: "iconfont" !important;
                        font-style: normal;
                        line-height: 20rem/$fontSize;
                        -webkit-font-smoothing: antialiased;
                        -moz-osx-font-smoothing: grayscale;
                    }
                }
            }
            & .text-direction {
                padding: 10rem/$fontSize 0 15rem/$fontSize;
                font-size: 12rem/$fontSize;
                color: #555;
                line-height: 25rem/$fontSize;
                & input {
                    display: none;
                    &:checked + label {
                        color: #FFF;
                        background-color: #1D8AFF;
                    }
                }
                & label {
                    display: inline-block;
                    padding: 0 10rem/$fontSize;
                    margin-left: 8rem/$fontSize;
                    vertical-align: top;
                    border-radius: 2rem/$fontSize;
                }
            }
        }
    }
    &.active {
        // display: block;
        visibility:visible;
        & .edit-text-content {
            // -webkit-transition-duration: 0.6s;
            // transition-duration: 0.6s;
            @include transition-duration(0.6s);
        }
    }
    &.effect {
        & .edit-text-content {
            // -webkit-transform: translate3d(0, 0, 0);
            // transform: translate3d(0, 0, 0);
            // -webkit-transition-delay:.2s;
            // -moz-transition-delay:.2s;
            // -ms-transition-delay:.2s;
            // -o-transition-delay:.2s;
            // transition-delay:.2s;
            @include transition-delay(.1s);
            @include transform(translate3d(0, 0, 0));
        }
    }
}


.loading-box {
    position: absolute;
    top: 50%;
    left: 50%;
    @include transform(translate(-50%, -50%));
}

.loader {
    position: relative;
    width: 60rem/$fontSize;
    height: 60rem/$fontSize;
    border-radius: 50%;
    margin: 75rem/$fontSize;
    display: inline-block;
    vertical-align: middle;
}

.loader-1 .loader-outter {
    position: absolute;
    border: 4rem/$fontSize solid #f50057;
    border-left-color: transparent;
    border-bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    -webkit-animation: loader-1-outter 1s cubic-bezier(.42, .61, .58, .41) infinite;
    animation: loader-1-outter 1s cubic-bezier(.42, .61, .58, .41) infinite;
}

.loader-1 .loader-inner {
    position: absolute;
    border: 4rem/$fontSize solid #f50057;
    border-radius: 50%;
    width: 40rem/$fontSize;
    height: 40rem/$fontSize;
    left: calc(50% - 20rem/$fontSize);
    top: calc(50% - 20rem/$fontSize);
    border-right: 0;
    border-top-color: transparent;
    -webkit-animation: loader-1-inner 1s cubic-bezier(.42, .61, .58, .41) infinite;
    animation: loader-1-inner 1s cubic-bezier(.42, .61, .58, .41) infinite;
}

@-webkit-keyframes loader-1-outter {
    0% {
        // -webkit-transform: rotate(0deg);
        // transform: rotate(0deg);
        @include transform(rotate(0deg));
    }
    100% {
        @include transform(rotate(360deg));
    }
}

@keyframes loader-1-outter {
    0% {
        @include transform(rotate(0deg));
    }
    100% {
        @include transform(rotate(360deg));
    }
}

@-webkit-keyframes loader-1-inner {
    0% {
        @include transform(rotate(0deg));
    }
    100% {
        @include transform(rotate(-360deg));
    }
}

@keyframes loader-1-inner {
    0% {
        @include transform(rotate(0deg));
    }
    100% {
        @include transform(rotate(-360deg));
    }
}

.pop-pages {
    &.add-order{
        .icon-prev{
            display: inline-block;
        }
    }
}

.add-order{
    & .counts-add,
    & .counts-minus{
        float: left;
        width: 38px;
        height: 38px;
        line-height: 38px;
        text-align: center;
        border: 1px solid #ddd;
        background-color: #fff;
        font-size: 16px;
        color: #777;
    }
}
